﻿
Option Strict On

Imports osi.root.constants
Imports osi.root.connector
Imports osi.root.formation
Imports osi.root.procedure
Imports osi.root.utils
Imports osi.service.argument

Public Class block_flow_idevice_pool(Of T As idevice_pool(Of block))
    Inherits idevice_pool_adapter(Of block, flow, T)

    Public Sub New(ByVal f As T)
        MyBase.New(f)
    End Sub

    Protected NotOverridable Overrides Function to_dev_to_from_dev(ByVal i As flow, ByRef o As block) As Boolean
        Return block_flow_adapter.convert(i, o)
    End Function
End Class

<global_init(global_init_level.services)>
Public Class block_flow_idevice_pool
    Inherits block_flow_idevice_pool(Of idevice_pool(Of block))

    Public Sub New(ByVal f As idevice_pool(Of block))
        MyBase.New(f)
    End Sub

    Public Shared Function create(ByVal v As var, ByVal o As pointer(Of block_flow_idevice_pool)) As event_comb
        Return secondary_resolve(v,
                                 constants.block_flow_secondary_type_name,
                                 Function(i As idevice_pool(Of block)) As block_flow_idevice_pool
                                     Return New block_flow_idevice_pool(i)
                                 End Function,
                                 o)
    End Function

    Public Shared Function create(ByVal v As var, ByVal o As pointer(Of idevice_pool(Of flow))) As event_comb
        Return secondary_resolve(v,
                                 constants.block_flow_secondary_type_name,
                                 Function(i As idevice_pool(Of block)) As idevice_pool(Of flow)
                                     Return New block_flow_idevice_pool(i)
                                 End Function,
                                 o)
    End Function

    Private Shared Sub init()
        assert(device_constructor.register(Of block_flow_idevice_pool)(AddressOf create))
        assert(device_constructor.register(Of idevice_pool(Of flow))("block-flow-adapter-idevice-pool",
                                                                      AddressOf create))
    End Sub
End Class

Public Class block_flow_isync_device_pool(Of T As isync_device_pool(Of block))
    Inherits isync_device_pool_adapter(Of block, flow, T)

    Public Sub New(ByVal f As T)
        MyBase.New(f)
    End Sub

    Protected NotOverridable Overrides Function from_dev_to_to_dev(ByVal i As block, ByRef o As flow) As Boolean
        Return block_flow_adapter.convert(i, o)
    End Function

    Protected NotOverridable Overrides Function to_dev_to_from_dev(ByVal i As flow, ByRef o As block) As Boolean
        Return block_flow_adapter.convert(i, o)
    End Function
End Class

<global_init(global_init_level.services)>
Public Class block_flow_isync_device_pool
    Inherits block_flow_isync_device_pool(Of isync_device_pool(Of block))

    Public Sub New(ByVal f As isync_device_pool(Of block))
        MyBase.New(f)
    End Sub

    Public Shared Function create(ByVal v As var, ByVal o As pointer(Of block_flow_isync_device_pool)) As event_comb
        Return secondary_resolve(v,
                                 constants.block_flow_secondary_type_name,
                                 Function(i As isync_device_pool(Of block)) As block_flow_isync_device_pool
                                     Return New block_flow_isync_device_pool(i)
                                 End Function,
                                 o)
    End Function

    Public Shared Function create(ByVal v As var, ByVal o As pointer(Of isync_device_pool(Of flow))) As event_comb
        Return secondary_resolve(v,
                                 constants.block_flow_secondary_type_name,
                                 Function(i As isync_device_pool(Of block)) As isync_device_pool(Of flow)
                                     Return New block_flow_isync_device_pool(i)
                                 End Function,
                                 o)
    End Function

    Private Shared Sub init()
        assert(device_constructor.register(Of block_flow_isync_device_pool)(AddressOf create))
        assert(device_constructor.register(Of isync_device_pool(Of flow))("block-flow-adapter-isync-device-pool",
                                                                           AddressOf create))
    End Sub
End Class

Public Class block_flow_iasync_device_pool(Of T As iasync_device_pool(Of block))
    Inherits iasync_device_pool_adapter(Of block, flow, T)

    Public Sub New(ByVal f As T)
        MyBase.New(f)
    End Sub

    Protected NotOverridable Overrides Function from_dev_to_to_dev(ByVal i As block,
                                                                   ByVal o As pointer(Of flow)) As event_comb
        Return block_flow_adapter.convert(i, o)
    End Function

    Protected NotOverridable Overrides Function to_dev_to_from_dev(ByVal i As flow, ByRef o As block) As Boolean
        Return block_flow_adapter.convert(i, o)
    End Function
End Class

<global_init(global_init_level.services)>
Public Class block_flow_iasync_device_pool
    Inherits block_flow_iasync_device_pool(Of iasync_device_pool(Of block))

    Public Sub New(ByVal f As iasync_device_pool(Of block))
        MyBase.New(f)
    End Sub

    Public Shared Function create(ByVal v As var, ByVal o As pointer(Of block_flow_iasync_device_pool)) As event_comb
        Return secondary_resolve(v,
                                 constants.block_flow_secondary_type_name,
                                 Function(i As iasync_device_pool(Of block)) As block_flow_iasync_device_pool
                                     Return New block_flow_iasync_device_pool(i)
                                 End Function,
                                 o)
    End Function

    Public Shared Function create(ByVal v As var, ByVal o As pointer(Of iasync_device_pool(Of flow))) As event_comb
        Return secondary_resolve(v,
                                 constants.block_flow_secondary_type_name,
                                 Function(i As iasync_device_pool(Of block)) As iasync_device_pool(Of flow)
                                     Return New block_flow_iasync_device_pool(i)
                                 End Function,
                                 o)
    End Function

    Private Shared Sub init()
        assert(device_constructor.register(Of block_flow_iasync_device_pool)(AddressOf create))
        assert(device_constructor.register(Of iasync_device_pool(Of flow))("block-flow-adapter-iasync-device-pool",
                                                                            AddressOf create))
    End Sub
End Class

Public Class block_flow_new_device_event_isync_device_pool(Of T As new_device_event_isync_device_pool(Of block))
    Inherits new_device_event_isync_device_pool_adapter(Of block, flow, T)

    Public Sub New(ByVal f As T)
        MyBase.New(f)
    End Sub

    Protected NotOverridable Overrides Function from_dev_to_to_dev(ByVal i As block, ByRef o As flow) As Boolean
        Return block_flow_adapter.convert(i, o)
    End Function

    Protected NotOverridable Overrides Function to_dev_to_from_dev(ByVal i As flow, ByRef o As block) As Boolean
        Return block_flow_adapter.convert(i, o)
    End Function
End Class

<global_init(global_init_level.services)>
Public Class block_flow_new_device_event_isync_device_pool
    Inherits block_flow_new_device_event_isync_device_pool(Of new_device_event_isync_device_pool(Of block))

    Public Sub New(ByVal f As new_device_event_isync_device_pool(Of block))
        MyBase.New(f)
    End Sub

    Public Shared Function create(ByVal v As var,
                                  ByVal o As pointer(Of block_flow_new_device_event_isync_device_pool)) As event_comb
        Return secondary_resolve(v,
                                 constants.block_flow_secondary_type_name,
                                 Function(i As new_device_event_isync_device_pool(Of block)) _
                                         As block_flow_new_device_event_isync_device_pool
                                     Return New block_flow_new_device_event_isync_device_pool(i)
                                 End Function,
                                 o)
    End Function

    Public Shared Function create(ByVal v As var,
                                  ByVal o As pointer(Of new_device_event_isync_device_pool(Of flow))) As event_comb
        Return secondary_resolve(v,
                                 constants.block_flow_secondary_type_name,
                                 Function(i As new_device_event_isync_device_pool(Of block)) _
                                         As new_device_event_isync_device_pool(Of flow)
                                     Return New block_flow_new_device_event_isync_device_pool(i)
                                 End Function,
                                 o)
    End Function

    Private Shared Sub init()
        assert(device_constructor.register(Of block_flow_new_device_event_isync_device_pool)(AddressOf create))
        assert(device_constructor.register(Of new_device_event_isync_device_pool(Of flow))(
                                                  "block-flow-adapter-new-device-event-isync-device-pool",
                                                  AddressOf create))
    End Sub
End Class
